﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IronLua
{
    internal static class StringExtensions
    {
        public static string FormatWith(this string str, params object[] args)
        {
            return string.Format(str, args);
        }

        public static string ToChunkName(this string name, uint index, uint depth)
        {
            if (!string.IsNullOrWhiteSpace(name))
                return name;

            return "<chunk${0}_{1}>".FormatWith(index, depth);
        }

    }
}
